<?php
namespace catchAdmin\mbqy\tables;

use catchAdmin\mbqy\tables\forms\Factory;
use catcher\CatchTable;
use catcher\library\table\Actions;
use catcher\library\table\HeaderItem;
use catcher\library\table\Search;

class Fwitems extends CatchTable
{
    protected function form()
    {
        // TODO: Implement form() method.
        return Factory::create('fwitems');
    }

    protected function table()
    {
        // TODO: Implement table() method.
        return $this->getTable('Fwitems')
                    ->header([
                        HeaderItem::label()->selection(),
                        HeaderItem::label('服务分类名称')->prop('item_name'),
                        HeaderItem::label('服务分类编码')->prop('unique_no'),
                        HeaderItem::label('服务分类概述')->prop('summary'),
                        // HeaderItem::label('服务周期')->prop('cycle'),
                        HeaderItem::label('创建时间')->prop('created_at'),
                        HeaderItem::label('操作')->actions([
                            Actions::update(),
                            Actions::delete()
                        ])
                    ])
                    ->withActions([
                        Actions::create()
                    ])
                    ->withDialogWidth('35%')
                    ->withApiRoute('fwitems')
                    ->selectionChange()
                    ->render();
    }
}